import app


class TenderApi():
    def __init__(self):
        self.loan_info_url=app.BASC_URL+"/common/loan/loaninfo"
        self.get_tender_data=app.BASC_URL+"/trust/trust/tender"
        self.get_mylist_url=app.BASC_URL+"/loan/tender/mytenderlist"
    def loan_info_api(self,session,id):
        form_data={"id": id}
        res=session.post(self.loan_info_url,data=form_data)
        return res
    def get_tender_api(self,session,loan_id,amount):
        form_data={"id": loan_id, "amount": amount}
        res=session.post(self.get_tender_data,data=form_data)
        return res

    def get_mylist_api(self,session,tender):
        form_data={"status": tender}
        res=session.post(self.get_mylist_url,data=form_data)
        return res

    

